package com.y2w.gulimall.product.vo;

import com.y2w.gulimall.product.entity.SkuImagesEntity;
import com.y2w.gulimall.product.entity.SkuInfoEntity;
import com.y2w.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {

    //sku基本信息 pms_sku_info
    SkuInfoEntity skuInfoEntity;

    boolean hasStock=true;
    //sku图片信息 pms_sku_images
    List<SkuImagesEntity> images;
    //spu销售属性组合
    List<SkuItemSaleAttrVo> saleAttr;
    //spu的介绍
    SpuInfoDescEntity desp;
    //spu规格参数信息
    List<SpuItemAttrGroupVo> groupAttrs;

    SeckillInfoVo seckillInfoVo;


    @Data
    public static class SkuItemSaleAttrVo{
        private Long attrId;
        /**
         * 属性名
         */
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }
    @Data
    public static class SpuItemAttrGroupVo{
        private  String groupName;
        private List<SpuBaseAttrVo> attrs;
    }
    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }
}
